package com.example.usercenter.service;

import com.example.usercenter.model.User;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;

/**
 *用户服务
 */
public interface UserService extends IService<User> {
    
    /**
     * 用户注册服务
     * @param userAccount 账号
     * @param password 密码
     * @param checkPassword 校验密码
     * @return 用户id
     */
    long userRegister(String userAccount,String password,String checkPassword);

    /**
     * 用户登录服务
     * @param userAccount
     * @param password
     * @param request
     * @return
     */
    User userLogin(String userAccount, String password, HttpServletRequest request);

    /**
     * 用户脱敏
     * @param user
     * @return
     */
    User getSafetyUser(User user);
}
